#ifndef _CENARIOJOGO_H
#define _CENARIOJOGO_H

#include "Fundo.h"
#include "Tabuleiro.h"
#include "CGFscene.h"
#include <time.h>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <math.h>
using std::stringstream;
using std::cout;
using std::endl;
using std::ends;

#define N 0
#define NE 1
#define E 2
#define SE 3
#define S 4
#define SW 5
#define W 6
#define NW 7

class CenarioJogo : public CGFscene
{
private:
	int gamemode;
	CGFlight* light0;
	Tabuleiro* t;
	float x,y,dx,dy,xf,yf;
	int prevx,prevy,actualx,actualy;
	int timer;
	bool light,anim;
	vector<Peca> pecaanim;
	bool tumbling;
	int tumblingsize;
	clock_t start;
	int deslx;
	int desly;
	bool undoplay;
public:
	CenarioJogo();
	void init();
	void display();
	void toggleLight();
	void setSimpleMoveAnimation(int xi, int yi, int fx, int fy);
	void setTumblingMoveAnimation(int xi, int yi, int dir);
	void setSimpleMoveUndo();
	void setTumblingMoveUndo();
	void showInfo();
	void drawString(const char *str, int x, int y, float color[4], void *font);
	int round(float num);
};

#endif